From: Jonas Ã…dahl Date: Tue, 1 Oct 2019 10:02:31 +0000 (+0200) Subject: main: Inhibit animations when software rendered X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~772^2^2~89 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=394121f77d3c16bc3a66ff3e5092e2b4697cbc64;p=gnome-shell.git main: Inhibit animations when software rendered This was previously decided by gsd-xsettings. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/757 --- diff --git a/js/ui/main.js b/js/ui/main.js index f0a0ac15f..09f1465e4 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -161,6 +161,8 @@ function _initializeUI() { _loadOskLayouts(); _loadDefaultStylesheet(); + new AnimationsSettings(); + // Setup the stage hierarchy early layoutManager = new Layout.LayoutManager(); @@ -758,3 +760,13 @@ function showRestartMessage(message) { let restartMessage = new RestartMessage(message); restartMessage.open(); } + +var AnimationsSettings = class { + constructor() { + let backend = Meta.get_backend(); + if (!backend.is_rendering_hardware_accelerated()) { + St.Settings.get().inhibit_animations(); + return; + } + } +};